group { name: "efl/frame";
   data.item: "version" "123";
   images.image: "win_shad_flat.png" COMP;
   parts {
      part { name: "shadow"; type: RECT;
         description { state: "default" 0.0;
            rel.to: "_sh1";
            color_class: "/shadow/normal/frame";
         }
         description { state: "hidden" 0.0;
            inherit;
            visible: 0;
         }
      }
      WIN_SHAD("base", "shadow", "win_shad_flat.png", 10, 10, 7, 14, 0.25);
      part { name: "base"; type: SPACER;
         scale: 1;
         description { state: "default" 0.0;
            rel1.offset: 6 6;
            rel2.offset: -7 -7;
            offscale;
         }
      }
      part { name: "top_bg"; type: RECT;
         description { state: "default" 0.0;
            rel.to: "top";
            color_class: "/bg/normal/frame/title";
         }
      }
      part { name: "top"; type: SPACER;
         scale: 1;
         description { state: "default" 0.0;
            rel1.to: "base";
            rel2.to_x: "base";
            rel2.to_y: "efl.text";
            rel2.offset: -1 3;
            offscale;
         }
      }
      part { name: "efl.text"; type: TEXT;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "base";
            rel1.offset: 4 4;
            rel2.relative: 1.0 0.0;
            rel2.offset: -5 4;
            align: 0.0 0.0;
            color_class: "/fg/normal/frame/title";
            text { font: FNBD; size: 10;
               align: 0.0 0.0;
               min: 0 1;
            }
            fixed: 0 1;
            offscale;
         }
      }
      part { name: "bg"; type: RECT;
         scale: 1;
         description { state: "default" 0.0;
            rel1.to_x: "base";
            rel1.to_y: "top";
            rel1.relative: 0.0 1.0;
            rel2.to: "base";
            color_class: "/bg/normal/frame";
         }
      }
      part { name: "clip"; type: RECT;
         description { state: "default" 0.0;
            rel.to: "bg";
         }
      }
      part { name: "efl.content"; type: SWALLOW;
         clip_to: "clip";
         scale: 1;
         description { state: "default" 0.0;
            align: 0.0 1.0;
            rel.to: "bg";
            rel1.offset: 4 4;
            rel2.offset: -5 -5;
            offscale;
         }
         description { state: "collapsed" 0.0;
            inherit: "default" 0.0;
            minmul: 1.0 0.0;
            rel1.offset: 4 0;
            rel2.offset: -5 -1;
         }
      }
      part { name: "event"; type: RECT; ignore_flags: ON_HOLD;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            rel1.to_y: "efl.text";
            rel2.to_y: "efl.text";
         }
      }
   }
   programs {
      EFL_UI_CLICKABLE_PART_BIND("event")
      program { name: "collapse";
         action:  STATE_SET "collapsed" 0.0;
         target: "efl.content";
         transition: ACCELERATE 0.3;
         after: "signal";
      }
      program { name: "expand";
         action:  STATE_SET "default" 0.0;
         target: "efl.content";
         transition: DECELERATE 0.3;
         after: "signal";
      }
      program { signal:  "mouse,up,1"; source:  "event";
         action:  SIGNAL_EMIT "efl,action,click" "efl";
      }
      program { signal:  "efl,action,toggle"; source: "efl";
         script {
            new st[31];
            new Float:vl;
            get_state(PART:"efl.content", st, 30, vl);
            if (!strcmp(st, "default"))
              run_program(PROGRAM:"collapse");
            else
              run_program(PROGRAM:"expand");
         }
      }
      program { signal:  "efl,action,switch"; source: "efl";
         script {
            new st[31];
            new Float:vl;
            get_state(PART:"efl.content", st, 30, vl);
            if (!strcmp(st, "default"))
              set_state(PART:"efl.content", "collapsed", 0.0);
            else
              set_state(PART:"efl.content", "default", 0.0);
         }
      }
      program { name: "signal";
         action: SIGNAL_EMIT "efl,anim,done" "efl";
      }
   }
}
